<template>
	<view>
		<uni-popup ref="popup_back" :type="popup_position" :is-mask-click="isMaskClick"
			:mask-background-color="maskBackgroundColor">

			<view class="popup_back_content" v-if="popup_position == 'center'">


				<view class="header"> 提示 </view>
				<view class="content"> 删除后将无法恢复？<br>确定删除吗</view>
				<view class="btn">
					<view class="item cancel" @click="confirm">确定</view>
					<view class="item confirm" @click="popupClose">取消</view>
				</view>

			</view>
			<view class="popup_back_bottom" v-if="popup_position == 'bottom'">
				<view class="popup_back_bottomCon">
					<view class="popup_back_content">
						<view class="header"> 提示 </view>
						<view class="content"> 删除后将无法恢复？<br>确定删除吗</view>
						<view class="btn">
							<view class="item cancel" @click="confirm">确定</view>
							<view class="item confirm" @click="popupClose">取消</view>
						</view>
					</view>
				</view>
			</view>

		</uni-popup>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				isMaskClick: false,
				maskBackgroundColor: "rgba(0,0,0,0.3)",
			}
		},
		props: {
			popup_position: {
				type: String,
				default: "center"
			}
		},
		methods: {
			popupOpen() {
				this.$nextTick(() => {
					this.$refs.popup_back.open()
				})

			},
			popupClose() {
				this.$nextTick(() => {
					this.$refs.popup_back.close()
				})
			},
			confirm() {

				this.popupClose()
				this.$emit("del_confirm")

			},


		}
	}
</script>

<style lang="scss" scoped>
	.popup_back_content {
		width: 519.23rpx;
		height: 394.23rpx;
		overflow: hidden;
		background: #ffffff;
		border-radius: 34.62rpx;
		

		.header {
			text-align: center;
			height: 115.38rpx;
			font-size: 32rpx;
			color: #ffffff;
			line-height: 115.38rpx;
			font-size: 32.69rpx;
			font-weight: 500;
			background: url(../../static/images/resetHeaderBg.png) center center no-repeat;
			background-size: 100% 100%;
		}

		.content {
			font-size: 30.77rpx;
			font-weight: 400;
			color: #666666;
			height: 146.15rpx;
			line-height: 53.85rpx;
			padding-top: 38.46rpx;
			text-align: center;
		}

		.btn {
			display: flex;
			height: 92.31rpx;
			border-top: 2rpx solid #D9D9D9;

			.item {
				flex: 1;
				text-align: center;
				height: 92.31rpx;
				line-height: 92.31rpx;
				font-size: 30.77rpx;
				font-weight: 400;
			}

			.cancel {
				border-right: 2rpx solid #D9D9D9;
				box-sizing: border-box;
				color: #999999;
			}

			.confirm {
				color: #226CFF;
			}
		}

	}

	.popup_back_bottom {
		height: 520rpx;

		.popup_back_bottomCon {
			width: 567rpx;
			height: 520rpx;
			margin: 0 auto;

		}
	}
</style>